package com.frxuexi.lib_base.utils

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData

object LiveDataBus {

//    val commentData = MutableLiveData<Int>()
//
//    fun sendComment(count: Int) {
//        commentData.postValue(count)
//    }
//
//    fun getComment(): LiveData<Int> {
//        return commentData
//    }

    val myEventData = MutableLiveData<MyEvent>()
//
    fun sendEvent(event: MyEvent) {
        myEventData.postValue(event)
    }

    fun getEnevt(): LiveData<MyEvent> {
        return myEventData
    }

    data class MyEvent (
        var type: String,
        var content: Any
    )

}